package com.example.oauth2.base.repository;

import com.example.oauth2.base.domain.SsoUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface SsoUserRepository extends JpaRepository<SsoUser, String>, JpaSpecificationExecutor<SsoUser> {

    @Query(value = "select * from sso_user where username = ?1",nativeQuery = true)
    public SsoUser findByUsername(String username);

}
